<%@ page import="cn.gudian.cms.Admin.AuthSession; cn.gudian.cms.GuestBook.GuestBook" %>
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
  <meta name="layout" content="main"/>
  <title><g:message code="guestBook.edit" default="Edit GuestBook"/></title>
</head>
<body>
<div class="nav">
  <span class="menuButton"><a class="home" href="${createLinkTo(dir: '')}"><g:message code="home" default="Home"/></a></span>
  <span class="menuButton"><g:link class="list" action="list"><g:message code="guestBook.list" default="GuestBook List"/></g:link></span>
</div>
<div class="body">
  <h1><g:message code="guestBook.edit" default="Edit GuestBook"/></h1>
  <g:if test="${flash.message}">
    <div class="message"><g:message code="${flash.message}" args="${flash.args}" default="${flash.defaultMessage}"/></div>
  </g:if>
  <g:hasErrors bean="${guestBookInstance}">
    <div class="errors">
      <g:renderErrors bean="${guestBookInstance}" as="list"/>
    </div>
  </g:hasErrors>
  <g:form method="post">
    <g:hiddenField name="id" value="${guestBookInstance?.id}"/>
    <g:hiddenField name="version" value="${guestBookInstance?.version}"/>
    <div class="dialog">
      <table>
        <tbody>
       <tr class="prop">
          <td valign="top" class="name">
            <label for="name">留言人:</label>
          </td>
          <td valign="top">

            ${guestBookInstance?.name} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;联系方式： ${guestBookInstance?.contact}
          </td>
        </tr>
         <tr class="prop">
          <td valign="top" class="name">
            <label for="name">留言内容:</label>
          </td>
          <td valign="top">

            ${guestBookInstance?.content}
          </td>
        </tr>
        <tr class="prop">
          <td valign="top" class="name">
            <label for="audit"><g:message code="guestBook.audit" default="Audit"/>:</label>
          </td>
          <td valign="top" class="value ${hasErrors(bean: guestBookInstance, field: 'audit', 'errors')}">

            <g:hiddenField name="name" value="${fieldValue(bean: guestBookInstance, field: 'name')}"/>
            <g:hiddenField name="contact" value="${fieldValue(bean: guestBookInstance, field: 'contact')}"/>
            <g:hiddenField name="content" value="${fieldValue(bean: guestBookInstance, field: 'content')}"/>
            <g:hiddenField name="subTime" value="${fieldValue(bean: guestBookInstance, field: 'subTime')}"/>
            <g:hiddenField name="ip" value="${fieldValue(bean: guestBookInstance, field: 'ip')}"/>
            <g:hiddenField name="reName" value="${fieldValue(bean: guestBookInstance, field: 'reName')}"/>
            <g:checkBox name="audit" value="${guestBookInstance?.audit}"/>

          </td>
        </tr>
        <tr class="prop">
          <td valign="top" class="name">
            <label for="reContet"><g:message code="guestBook.reContet" default="Re Contet"/>:</label>
          </td>
          <td valign="top" class="value ${hasErrors(bean: guestBookInstance, field: 'reContet', 'errors')}">

            <g:textArea name="reContet">${fieldValue(bean: guestBookInstance, field: 'reContet')}</g:textArea>
          </td>
        </tr>

        </tbody>
      </table>
    </div>
    <div class="buttons">
      <span class="button"><g:actionSubmit class="save" action="update" value="${message(code: 'update', 'default': 'Update')}"/></span>
      <span class="button"><g:actionSubmit class="delete" action="delete" value="${message(code: 'delete', 'default': 'Delete')}" onclick="return confirm('${message(code: 'delete.confirm', 'default': 'Are you sure?')}');"/></span>
    </div>
  </g:form>
</div>
</body>
</html>
